home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000146_icon-group-sender _Fri Jun 28 15:06:42 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Fri, 28 Jun 1996 16:27:27 MST
  2. Date: Fri, 28 Jun 1996 15:06:42 -0500
  3. From: jeffery@dragon.cs.utsa.edu (Clinton Jeffery)
  4. Message-Id: <199606282006.PAA10115@coyote25.cs.utsa.edu>
  5. To: H.Lawson@tees.ac.uk
  6. Cc: icon-group@cs.arizona.edu
  7. In-Reply-To: <31D3FA40.1435@tees.ac.uk> (message from Hamish Lawson on Fri, 28 Jun 1996 16:29:04 +0100)
  8. Subject: Re: Ordered tables
  9. Content-Length: 0
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11. Status: O
  12.  
  13.  
  14.    [Hamish Lawson writes:]
  15.    I'd like to be able to obtain the keys of a table in the order of their 
  16.    creation (key() produces them in random order). Is there a way to do this?
  17.  
  18. No, there is no timestamp or ordering information for elements within tables.
  19.  
  20.    Failing that, what is the best way to go about implementing a data 
  21.    structure in Icon that is both indexed and ordered?
  22.  
  23. The easiest way is to maintain a list and table in tandem; when you insert
  24. into the table, put into the list at the same time.  The Idol technical
  25. report has an example class (tabular queue, or taque) that does this, but
  26. you can do it by hand in Icon just fine.
  27.  
  28. Clint Jeffery
  29. jeffery@ringer.cs.utsa.edu
  30. Division of Computer Science
  31. The University of Texas at San Antonio
  32. Research http://www.cs.utsa.edu/research/plss.html
  33.